package com.dantefung.spring.test;

import com.dantefung.spring.test.config.MyConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 
public class Main {
	public static void main(String[] args) {
		// 获取容器
		ApplicationContext ac =new AnnotationConfigApplicationContext(MyConfig.class);
		// 获取 bean
		MyUser user = (MyUser) ac.getBean("qmyUser");
		System.out.println(user.toString());
	}
}